<?php

use Illuminate\Routing\Router;

Admin::registerHelpersRoutes();

Route::group([
    'prefix' => config('admin.prefix'),
    'namespace' => Admin::controllerNamespace(),
    'middleware' => ['web', 'admin'],
], function (Router $router) {
    $router->get('/', 'HomeController@index');
    $router->any('api/users','UserController@users');
    $router->any('api/posts','PostController@posts');
    $router->resource('user','UserController');
});

Route::group([
    'prefix' => config('admin.prefix'),
    'namespace' => 'App\Admin\Controllers\Article',
    'middleware' => ['web', 'admin'],
], function (Router $router) {



    $router->resource('article/column', 'ColumnController');
    $router->resource('article/posts', 'PostController');
    $router->resource('article/comment', 'CommentController');
});
